﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel.Channels;
using Devtm.ServiceModel.Helpers;
using System.ServiceModel;

namespace Devtm.ServiceModel.Configurations
{


    public enum DiscoveryVersionEnum
    {
        WSDiscovery11,
        WSDiscoveryApril2005,
        WSDiscoveryCD1
    }

    public partial class LocatorSection
    {


        public static LocatorSection OptimistConfiguration
        {
            get
            {

                LocatorSection section = null;

                try
                {
                    section = LocatorSection.Configuration;
                    if (section.IsReadOnly())
                        section = section.AsWritable();
                }
                catch (Exception)
                {
                    section = new LocatorSection();
                }
                               
                return section;

            }
        }       

    }



    public partial class UrlBaseElement
    {

        private Binding _binding = null;
        public Binding Binding
        {
            get
            {
                if (_binding == null)
                    _binding = BindingHelper.CreateBinding(BindingName, BindingConfiguration);

                return _binding;
            }
        }

    }


    public enum ServiceDiscoveryMode
    {
       
        Adhoc = 0,
        
        Managed = 1,
    }

}
